﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DARE
{
    public class CControllerData : CComponentData
    {
        //public CController controller;
        public float speed;

        public override void FillDataStructure(object component)
        {
            base.FillDataStructure(component);
            //controller = component as CController;
            speed = (component as CController).CharacterController.MoveSpeed;
        }

        //public override void FillFromDataStructure(ref CComponent component, CRender3D render, CHUDSystem hud)
        //{
        //    base.FillFromDataStructure(ref component, render, hud);
        //   (component as CController).CharacterController.MoveSpeed = speed;
        //}

        public override void FillFromDataStructure(ref CComponent component, CRender3D render, CHUDSystem hud)
        {
            base.FillFromDataStructure(ref component, render, hud);
            (component as CController).CharacterController.MoveSpeed = speed;
        }
    }
}
